<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        function Father(name, ega) {
            this.name = name,
                this.ega = ega
        }
        Father.prototype.show = function () {
            console.log(111);
        }

        function Son(name, ega, sex) {
            Father.call(this, name, ega)
            this.sex = sex
        }
        Son.prototype = new Father()
        var s = new Son('郑飞鸿', 18, '男')
        s.show()
        console.log(s);
    </script>
</body>

</html>